package cn.liuhuan1;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.client.loadbalancer.LoadBalanced;
import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
import org.springframework.cloud.netflix.eureka.server.EnableEurekaServer;
import org.springframework.cloud.netflix.feign.EnableFeignClients;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.ComponentScans;
import org.springframework.context.annotation.PropertySource;
import org.springframework.web.client.RestTemplate;

/**
 * @Auther: liuhuan
 * @Date: 2021/1/17 - 01 - 17 - 20:02
 * @Description:
 * @version: 1.0
 */
 @SpringBootApplication
 @EnableEurekaClient
 @ComponentScans(value = {@ComponentScan(value = "cn.liuhuan1.redis.*")})
 @EnableFeignClients
public class SpringCloudRedisStart {

    public static void main(String[] args) {
        SpringApplication.run(SpringCloudRedisStart.class,args);
    }

    @Bean
    @LoadBalanced
    RestTemplate restTemplate(){
        return new RestTemplate();
    }
}
